package xxx.host.mpapi.controller;

import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import xxx.core.service.StudentService;
import xxx.pojo.vo.StudentVo;

/**
 * @author yuanchengman
 * @date 2021-08-16
 */
@RestController
@RequestMapping("/student")
public class StudentController {

    @Autowired
    private StudentService studentService;

    @GetMapping("/getByName")
    @ApiOperation("通过姓名查询学生")
    public StudentVo getByName(@RequestParam("name") String name) {
        return studentService.getByName(name);
    }
}
